package gameLevel.classicLevel;

import object.Grass;
import object.Iron;
import object.Wall;
import tank.Dir;
import tank.EnemyTank;
import tank.TankType;

public class ClassicLevel_2 extends ClassicLevel{

    @Override
    protected void initEnemyTanks() {
        enemyTanks.add(new EnemyTank(TankType.ENEMY2, 11, 50, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY2, 150, 200, Dir.RIGHT));
        enemyTanks.add(new EnemyTank(TankType.ENEMY2, 385, 50, Dir.DOWN));
        enemyTanks.add(new EnemyTank(TankType.ENEMY2, 741, 50, Dir.LEFT));
        enemyTanks.add(new EnemyTank(TankType.ENEMY2, 741, 280, Dir.LEFT));

        enemyTankMove();
    }

    @Override
    protected void initTerrainLayout() {
        for(int i = 0; i < 6; i++){
            new Wall(40, 560 - i * 30);
            new Grass(760 - i * 30, 340);
            new Grass(760 - i * 30, 370);
            new Grass(760 - i * 30, 400);

            if(i >= 1){
                new Wall(240, 360 - (i - 1) * 30);
                new Wall(325, 410 - (i - 1) * 30);
                new Wall(445, 410 - (i - 1) * 30);
            }

            if(i >= 2){
                new Wall(210 + (i - 2) * 30, 150);
                new Wall(550 - (i - 2) * 30, 120);
                new Iron(580, 30 + (i - 2) * 30);
            }

            if(i >= 3){
                new Wall(70 + (i - 3) * 30, 300);
                new Iron(160, 300 + (i - 3) * 30);
                new Iron(760 - (i - 3) * 30, 160);
            }

            if(i >= 4){
                new Wall(100, 100 + (i - 4) * 30);
                new Grass(130, 70 + (i - 4) * 30);
                new Wall(200, 560 - (i - 4) * 30);
                new Wall(355 - (i - 4) * 30, 440);
                new Wall(385, 440 - (i - 4) * 30);
                new Wall(415 + (i - 4) * 30, 440);
                new Wall(570, 250 + (i - 4) * 30);
                new Wall(600, 250 + (i - 4) * 30);
                new Wall(610, 560 - (i - 4) * 30);
                new Wall(670, 160 - (i - 4) * 30);
                new Wall(670, 560 - (i - 4) * 30);
            }

            if(i == 5){
                new Iron(10, 410);
                new Grass(100, 70);
                new Wall(160, 390);
                new Iron(355, 410);
                new Iron(385, 180);
                new Iron(415, 410);
                new Iron(640, 560);
            }
        }
    }

}
